import router from "@/router";

// 封装全局延时跳转页面的函数
const replacePage = (url, times) => {
    let time = setTimeout(() => {
        router.push({
            path: url,
        }).then(() => {
            clearTimeout(time)
        })
    }, times)
}

// 手机号码校验
const isPoneAvailable =  (telephone) => {
    let more = /^1[0-9]{10}$/;
    return more.test(telephone);
};

export {
    replacePage,
    isPoneAvailable
}
